package pro.survey.analyzer.imp.window;

import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.control.Button;
import javafx.stage.Stage;
import pro.survey.analyzer.GUIGenerator;
import pro.survey.analyzer.Trans;

/**
 *
 * @author Adrian
 */
public class ButtonCancel extends Button {

    public ButtonCancel(final Stage dialogStage) {
        this.setText(GUIGenerator.getInstance().getLocaleText(Trans.CANCEL));
        this.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent t) {
                dialogStage.close();
        }});
    }

}
